package com.dragon.modules.yuegou.query.coupon;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.coupon.MerchantCouponGrantEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商户优惠券发放（商户发放优惠券给会员） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2020-03-21 11:04:17
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MerchantCouponGrantQuery extends MerchantCouponGrantEntity implements Query<MerchantCouponGrantEntity> {

    /** 发放记录ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商户优惠券ID查询条件 */
	@JsonUnwrapped(prefix = "merchantCouponId")
	private Condition<String> merchantCouponIdCondition;

    /** 停车券申请ID查询条件 */
	@JsonUnwrapped(prefix = "parkApplyId")
	private Condition<String> parkApplyIdCondition;

    /** 商户ID（冗余）查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 优惠券ID查询条件 */
	@JsonUnwrapped(prefix = "couponId")
	private Condition<String> couponIdCondition;

    /** 创建人（优惠券发放人）查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间（优惠券发放时间）查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MerchantCouponGrantQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantCouponGrantQuery(MerchantCouponGrantEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MerchantCouponGrantQuery(MerchantCouponGrantQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantCouponIdCondition != null) {
			this.merchantCouponIdCondition = other.merchantCouponIdCondition.copy();
		}
		if(other.parkApplyIdCondition != null) {
			this.parkApplyIdCondition = other.parkApplyIdCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.couponIdCondition != null) {
			this.couponIdCondition = other.couponIdCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MerchantCouponGrantEntity> toQueryWrapper() {
		QueryWrapper<MerchantCouponGrantEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantCouponIdCondition != null) {
			merchantCouponIdCondition.toWrapper(wrapper, COL_MERCHANT_COUPON_ID);
		}
		if (parkApplyIdCondition != null) {
			parkApplyIdCondition.toWrapper(wrapper, COL_PARK_APPLY_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (couponIdCondition != null) {
			couponIdCondition.toWrapper(wrapper, COL_COUPON_ID);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回发放记录ID查询条件
	 * 
	 * @return idCondition 发放记录ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取发放记录ID查询条件
	 * 
	 * @return idCondition 发放记录ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置发放记录ID查询条件
	 * 
	 * @param idCondition 发放记录ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商户优惠券ID查询条件
	 * 
	 * @return merchantCouponIdCondition 商户优惠券ID查询条件
	 */
	public Condition<String> merchantCouponId() {
		this.merchantCouponIdCondition = new Condition<>();
		return this.merchantCouponIdCondition;
	}
	
	/**
	 * 获取商户优惠券ID查询条件
	 * 
	 * @return merchantCouponIdCondition 商户优惠券ID查询条件
	 */
	public Condition<String> getMerchantCouponIdCondition() {
		return merchantCouponIdCondition;
	}

	/**
	 * 设置商户优惠券ID查询条件
	 * 
	 * @param merchantCouponIdCondition 商户优惠券ID查询条件
	 */
	public void setMerchantCouponIdCondition(Condition<String> merchantCouponIdCondition) {
		this.merchantCouponIdCondition = merchantCouponIdCondition;
	}

	/**
	 * 构造并返回停车券申请ID查询条件
	 * 
	 * @return parkApplyIdCondition 停车券申请ID查询条件
	 */
	public Condition<String> parkApplyId() {
		this.parkApplyIdCondition = new Condition<>();
		return this.parkApplyIdCondition;
	}
	
	/**
	 * 获取停车券申请ID查询条件
	 * 
	 * @return parkApplyIdCondition 停车券申请ID查询条件
	 */
	public Condition<String> getParkApplyIdCondition() {
		return parkApplyIdCondition;
	}

	/**
	 * 设置停车券申请ID查询条件
	 * 
	 * @param parkApplyIdCondition 停车券申请ID查询条件
	 */
	public void setParkApplyIdCondition(Condition<String> parkApplyIdCondition) {
		this.parkApplyIdCondition = parkApplyIdCondition;
	}

	/**
	 * 构造并返回商户ID（冗余）查询条件
	 * 
	 * @return merchantIdCondition 商户ID（冗余）查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID（冗余）查询条件
	 * 
	 * @return merchantIdCondition 商户ID（冗余）查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID（冗余）查询条件
	 * 
	 * @param merchantIdCondition 商户ID（冗余）查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回优惠券ID查询条件
	 * 
	 * @return couponIdCondition 优惠券ID查询条件
	 */
	public Condition<String> couponId() {
		this.couponIdCondition = new Condition<>();
		return this.couponIdCondition;
	}
	
	/**
	 * 获取优惠券ID查询条件
	 * 
	 * @return couponIdCondition 优惠券ID查询条件
	 */
	public Condition<String> getCouponIdCondition() {
		return couponIdCondition;
	}

	/**
	 * 设置优惠券ID查询条件
	 * 
	 * @param couponIdCondition 优惠券ID查询条件
	 */
	public void setCouponIdCondition(Condition<String> couponIdCondition) {
		this.couponIdCondition = couponIdCondition;
	}

	/**
	 * 构造并返回创建人（优惠券发放人）查询条件
	 * 
	 * @return createdByCondition 创建人（优惠券发放人）查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人（优惠券发放人）查询条件
	 * 
	 * @return createdByCondition 创建人（优惠券发放人）查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人（优惠券发放人）查询条件
	 * 
	 * @param createdByCondition 创建人（优惠券发放人）查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间（优惠券发放时间）查询条件
	 * 
	 * @return createdTimeCondition 创建时间（优惠券发放时间）查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间（优惠券发放时间）查询条件
	 * 
	 * @return createdTimeCondition 创建时间（优惠券发放时间）查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间（优惠券发放时间）查询条件
	 * 
	 * @param createdTimeCondition 创建时间（优惠券发放时间）查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
